.class public Lcom/jecelyin/editor/v2/ui/settings/a;
.super Landroid/preference/PreferenceFragment;
.source "SettingsFragment.java"

# interfaces
.implements Landroid/preference/Preference$OnPreferenceClickListener;


# static fields
.field private static a:Landroid/preference/Preference$OnPreferenceChangeListener;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .line 1
    new-instance v0, Lcom/jecelyin/editor/v2/ui/settings/a$a;

    invoke-direct {v0}, Lcom/jecelyin/editor/v2/ui/settings/a$a;-><init>()V

    sput-object v0, Lcom/jecelyin/editor/v2/ui/settings/a;->a:Landroid/preference/Preference$OnPreferenceChangeListener;

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Landroid/preference/PreferenceFragment;-><init>()V

    return-void
.end method

.method private static a(Landroid/preference/Preference;)V
    .locals 2

    .line 17
    sget-object v0, Lcom/jecelyin/editor/v2/ui/settings/a;->a:Landroid/preference/Preference$OnPreferenceChangeListener;

    invoke-virtual {p0, v0}, Landroid/preference/Preference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 18
    invoke-virtual {p0}, Landroid/preference/Preference;->getKey()Ljava/lang/String;

    move-result-object v0

    .line 19
    invoke-virtual {p0}, Landroid/preference/Preference;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Lcom/jecelyin/editor/v2/d;->a(Landroid/content/Context;)Lcom/jecelyin/editor/v2/d;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/jecelyin/editor/v2/d;->a(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    .line 20
    sget-object v1, Lcom/jecelyin/editor/v2/ui/settings/a;->a:Landroid/preference/Preference$OnPreferenceChangeListener;

    invoke-interface {v1, p0, v0}, Landroid/preference/Preference$OnPreferenceChangeListener;->onPreferenceChange(Landroid/preference/Preference;Ljava/lang/Object;)Z

    return-void
.end method

.method private static a(Landroid/preference/PreferenceGroup;)V
    .locals 7

    .line 1
    invoke-virtual {p0}, Landroid/preference/PreferenceGroup;->getPreferenceCount()I

    move-result v0

    .line 2
    invoke-virtual {p0}, Landroid/preference/PreferenceGroup;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Lcom/jecelyin/editor/v2/d;->a(Landroid/content/Context;)Lcom/jecelyin/editor/v2/d;

    move-result-object v1

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v0, :cond_6

    .line 3
    invoke-virtual {p0, v2}, Landroid/preference/PreferenceGroup;->getPreference(I)Landroid/preference/Preference;

    move-result-object v3

    .line 4
    invoke-virtual {v3}, Landroid/preference/Preference;->getKey()Ljava/lang/String;

    move-result-object v4

    .line 5
    instance-of v5, v3, Landroid/preference/PreferenceGroup;

    if-eqz v5, :cond_0

    .line 6
    check-cast v3, Landroid/preference/PreferenceGroup;

    invoke-static {v3}, Lcom/jecelyin/editor/v2/ui/settings/a;->a(Landroid/preference/PreferenceGroup;)V

    goto :goto_2

    .line 7
    :cond_0
    invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v5

    .line 8
    const-class v6, Landroid/preference/Preference;

    invoke-virtual {v5, v6}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_1

    goto :goto_2

    .line 9
    :cond_1
    invoke-virtual {v1, v4}, Lcom/jecelyin/editor/v2/d;->a(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v5

    .line 10
    instance-of v6, v3, Lcom/jecelyin/editor/v2/preference/CustomListPreference;

    if-eqz v6, :cond_2

    goto :goto_1

    .line 11
    :cond_2
    instance-of v6, v3, Landroid/preference/EditTextPreference;

    if-eqz v6, :cond_3

    .line 12
    move-object v6, v3

    check-cast v6, Landroid/preference/EditTextPreference;

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v6, v5}, Landroid/preference/EditTextPreference;->setText(Ljava/lang/String;)V

    goto :goto_1

    .line 13
    :cond_3
    instance-of v6, v3, Landroid/preference/CheckBoxPreference;

    if-eqz v6, :cond_4

    .line 14
    move-object v6, v3

    check-cast v6, Landroid/preference/CheckBoxPreference;

    check-cast v5, Ljava/lang/Boolean;

    invoke-virtual {v5}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v5

    invoke-virtual {v6, v5}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V

    :cond_4
    :goto_1
    const-string v5, "pref_symbol"

    .line 15
    invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_5

    .line 16
    invoke-static {v3}, Lcom/jecelyin/editor/v2/ui/settings/a;->a(Landroid/preference/Preference;)V

    :cond_5
    :goto_2
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_6
    return-void
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .locals 0

    .line 1
    invoke-super {p0, p1}, Landroid/preference/PreferenceFragment;->onCreate(Landroid/os/Bundle;)V

    .line 2
    sget p1, Lcom/jecelyin/editor/v2/p;->preference:I

    invoke-virtual {p0, p1}, Landroid/preference/PreferenceFragment;->addPreferencesFromResource(I)V

    .line 3
    invoke-virtual {p0}, Landroid/preference/PreferenceFragment;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object p1

    invoke-static {p1}, Lcom/jecelyin/editor/v2/ui/settings/a;->a(Landroid/preference/PreferenceGroup;)V

    return-void
.end method

.method public onPreferenceClick(Landroid/preference/Preference;)Z
    .locals 0

    const/4 p1, 0x1

    return p1
.end method
